<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!doctype html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>LoveTemperature</title>
		<meta name="author" content="ningzero"/>

		<!-- CSS -->
		<link rel="stylesheet" href="../css/memberManage.css">
		<!-- end CSS-->

	</head>

	<body>

		<div id="container">
			<header class="header">
				<div id="login_cart_bar">
					<div id="loginRegisterDiv">
						您好，<s:property value="#session.user.name" />
						<a class="pinkAnchor" href="http://localhost:8080/lovetemperature/sale/logout">退出登录</a>
					</div>
					<div id="cartAccountDiv">
						<a class="pinkAnchor">我的页面</a>
					</div>
				</div>
				<div id="logo_bar">
					<img src="../img/logo.gif"/>
					<img id="logo_text" src="../img/logo2.png"/>
				</div>
				<div id="nav_bar">
					<ul>
						<li class="nav_padding_left"></li>
						<li class='shouye'>
							<a href="http://localhost:8080/lovetemperature/sysadmin/showShop">店面管理</a>
						</li>
						<li class='dangao'>
							<a href="http://localhost:8080/lovetemperature/sysadmin/showStaff">员工管理</a>
						</li>
						<li class='mianbao'>
							<a href="http://localhost:8080/lovetemperature/sysadmin/showMember">会员管理</a>
						</li>
					</ul>
				</div>
			</header>
			<div id="mainContent" class="mainContent">
				<h4>会员列表</h4>
				<div id="memberListDiv">
					<table>
						<thead>
							<tr>
								<th>用户名</th>
								<th>邮箱</th>
								<th>电话</th>
								<th>地址</th>
								<th>状态</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
						<s:iterator value="memberList">
							<tr>
								<td class="memberName"><s:property value="name" /></td>
								<td class="memberEmail"><s:property value="email" /></td>
								<td class="memberPhone"><s:property value="phone" /></td>
								<td class="memberAddr"><s:property value="address" /></td>
								<td class="memberState"><s:property value="state" /></td>
								<td class="memberOperation" onclick='editMember(<s:property value="memberId" />)'>编辑</td>
							</tr>
						</s:iterator>
						</tbody>
					</table>
				</div>
				<div id="addStaffDiv">
					<div class="normalBtn" onclick="addMember()">添加会员</div>
				</div>
			</div>
		</div>
		<!--! end of #container -->
		
		<footer id="footer">
			<img src="../img/tmp/tmpfooter.png" />
		</footer>

		<!-- scripts -->
		<script type="text/javascript" src="../js/libs/jquery-1.9.1.min.js" ></script>
		<script type="text/javascript" src="../js/index.js" ></script>
		<script>
			function addMember() {
				window.location="http://localhost:8080/lovetemperature/sysadmin/editMember";
			}
			function editMember(memberId) {
				window.location="http://localhost:8080/lovetemperature/sysadmin/editMember?memberId="+memberId;
			}
		</script>
		<!-- end scripts-->
	</body>
</html>
